package com.ft.adbix.core.config;

import android.text.TextUtils;

import androidx.annotation.Keep;

public class AdBixInitConfig {

    private String appId;
    private boolean isDebug;
    private boolean isCanUseLocation;
    private boolean isCanUsePhoneState;
    private boolean isCanUseWifiState;
    private String appName;
    private String wxAppId;

    public String getAppId() {
        return appId;
    }

    public boolean isDebug() {
        return isDebug;
    }

    public String getAppName() {
        return appName;
    }

    public boolean isCanUseLocation() {
        return isCanUseLocation;
    }

    public boolean isCanUsePhoneState() {
        return isCanUsePhoneState;
    }

    public boolean isCanUseWifiState() {
        return isCanUseWifiState;
    }

    public String getWxAppId() {
        return wxAppId;
    }

    private AdBixInitConfig(){
        this.isDebug = false;
        this.isCanUseLocation = true;
        this.isCanUsePhoneState = true;
        this.isCanUseWifiState = true;
    }

    @Keep
    public static class Builder {
        private AdBixInitConfig config = new AdBixInitConfig();
        public Builder appId(String appId){
            config.appId = appId;
            return this;
        }

        public Builder appName(String appName){
            config.appName = appName;
            return this;
        }

        public Builder debug(boolean debug){
            config.isDebug = debug;
            return this;
        }

        public Builder isCanUseLocation(boolean isCanUseLocation){
            config.isCanUseLocation = isCanUseLocation;
            return this;
        }

        public Builder isCanUsePhoneState(boolean isCanUsePhoneState){
            config.isCanUsePhoneState = isCanUsePhoneState;
            return this;
        }

        public Builder isCanUseWifiState(boolean isCanUseWifiState) {
            config.isCanUseWifiState = isCanUseWifiState;
            return this;
        }

        public Builder setWxAppId(String wxAppId){
            config.wxAppId = wxAppId;
            return this;
        }

        public void check(){
            if (TextUtils.isEmpty(config.appId)){

            }
        }

        public AdBixInitConfig build(){
            return config;
        }

    }

    public static AdBixInitConfig defaultConfig(){
        return new AdBixInitConfig();
    }

}